package com.star.controller;


import com.star.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;


/**
 * @Classname TestController
 * @Author Star
 * @Date 2021/5/19 - 12:10
 * @Description
 */
@Controller
@RequestMapping("/test")
public class TestController {
    @Autowired
    private TestService testService;
    @RequestMapping("/one1")
    private ModelAndView list(ModelAndView modelAndView){
        System.out.println("111");
        modelAndView.setViewName("index");
        modelAndView.addObject("listtest",testService.list());
        System.out.println(testService.list());
        return modelAndView;
    }
}
